#ifndef __AE_NET_MODULE
#define __AE_NET_MODULE

#define AE_NODE 0
#define AE_READABLE 1
#define AE_WRITABLE 2
#define AE_MAXEVENT 64
#include <stdbool.h>

//typedef struct {
//	int fd;
//	bool read;
//	bool write;
//} event_t;

int ae_create();
int ae_free(int aefd);
int ae_add_read(int aefd,int fd);
int ae_add_write(int aefd,int fd);
int ae_del_event(int aefd,int fd);
int ae_enable_event(int aefd,int fd,bool readable,bool writable);
int ae_wait(int fd,int mask,int timeout);
//int ae_poll(int fd,event_t* fired,int nfired,int timeout);
int ae_poll2(int fd, int timeout, int(*func)(void*,int, int, int, bool, bool, int), void* usrdata,int usrhandle);

#endif

